package com.droidwatcher.JsonEntity;

import com.alibaba.fastjson.annotation.JSONField;
import com.droidwatcher.lib.IMessageBody;
import com.droidwatcher.lib.SMS;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2018/1/24.
 */

public class SMSJsonObj extends JsonBaseObj{

    Data data ;

    public Data getData() {
        return data;
    }

    public void setData(Data data) {
        this.data = data;
    }

    public static  class Data{
        @JSONField(name = "sms_list")
        List<SMS> smsList = new ArrayList<>();


        public List<SMS> getSmsList() {
            return smsList;
        }
//
//        public void setSmsList(List<SMS> smsList) {
//            this.smsList = smsList;
//        }
//

        public void setSmsList(List<IMessageBody> smsList) {
            for (int i = 0; i < smsList.size(); i++) {
                SMS sms = (SMS) smsList.get(i);
                this.smsList.add(sms);
            }
        }

    }
}
